home *** CD-ROM | disk | FTP | other *** search
- #include "needed.h"
- #include <exec/tasks.h>
-
- char data[10000];
-
- main() {
- int i;
- char test[40], j = 'y';
- for(i = 0; i < 40; i++) test[i] = 'a';
-
- i = spf(test,20,"Hello there people %ld %ld %s!\n",10,20,"yeah yeah");
- strupper(test);
- fpf(Output(),"Yeah this is %ld %s %lc %08lx%08lx\n",i, test, j,
- *(long *)(&test[16]), *(long *)(&test[20]) );
-
- if(BCmp("Yeah1234567890","Yeah1234567890",10))
- fpf(Output(),"As expected strings are the same\n");
-
- if(!BCmp("Yweah1234567890","Yeah1234567890",10))
- fpf(Output(),"As expected strings are different\n");
-
- BSet(data,5000,'a');
- BMov(data,&data[500],5000);
- data[8432] = 'b';
- BMov(&data[8001], &data[6000], 2000);
- fpf(Output(),"%lc %08lx %lc\n",data[381],data[5432],data[6431]);
-
- /* SignalTest(); */
-
- return(0);
- }
-
-
- /** following doesn't seem to work
- #define SIGS SIGBREAKF_CTRL_C|SIGBREAKF_CTRL_D|SIGBREAKF_CTRL_E|SIGBREAKF_CTRL_F
- void MagicFunction(void) {
- fpf(Output(),"Signal received...\n");
- }
- void SignalTest(void) {
- long oldsignals;
- struct Task *ourtask;
- oldsignals = SetExcept(0,0);
- ourtask = FindTask(NULL);
- ourtask->tc_ExceptCode = (APTR)&MagicFunction;
- oldsignals = SetExcept(SIGS,SIGS);
- fpf(Output(),"oldsignals = %04lx, mask = %04lx \n",oldsignals, SIGS);
- Delay(20*50);
- }
- */
-